
UPDATE FLW_ID_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'Tijs-new-macbook-pro.local (192.168.68.131)', LOCKGRANTED = SYSTIMESTAMP WHERE ID = 1 AND LOCKED = 0;

CREATE TABLE FLW_ID_ACCESS_TOKEN (ID_ VARCHAR2(64) NOT NULL, NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(2000), CREATION_TIME_ TIMESTAMP(6) NOT NULL, EXPIRATION_TIME_ TIMESTAMP(6), USER_ID_ VARCHAR2(255) NOT NULL, TENANT_ID_ VARCHAR2(255), TOKEN_VALUE_ VARCHAR2(2000), CONSTRAINT PK_FLW_ID_ACCESS_TOKEN PRIMARY KEY (ID_));

INSERT INTO FLW_ID_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('19', 'flowable', 'com/flowable/platform/idm/db/liquibase/flowable-idm-db-changelog.xml', SYSTIMESTAMP, 19, '8:579e6a0e19c2a0259e823e959d5bced4', 'createTable tableName=FLW_ID_ACCESS_TOKEN', '', 'EXECUTED', NULL, NULL, '4.20.0', '2902974637');

UPDATE FLW_ID_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;


UPDATE FLW_PL_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'Tijs-new-macbook-pro.local (192.168.68.131)', LOCKGRANTED = SYSTIMESTAMP WHERE ID = 1 AND LOCKED = 0;

CREATE TABLE FLW_SLA_DEFINITION (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, KEY_ VARCHAR2(128), VERSION_ INTEGER, DEPLOYMENT_ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(128), RESOURCE_NAME_ VARCHAR2(4000), TENANT_ID_ VARCHAR2(64) DEFAULT '', CONSTRAINT PK_FLW_SLA_DEFINITION PRIMARY KEY (ID_));

CREATE UNIQUE INDEX IDX_FLW_SLA_DEF_UNIQ ON FLW_SLA_DEFINITION(KEY_, VERSION_, TENANT_ID_);

CREATE INDEX IDX_SLA_DEF_DEPLOYMENT ON FLW_SLA_DEFINITION(DEPLOYMENT_ID_);

ALTER TABLE FLW_SLA_DEFINITION ADD CONSTRAINT FK_SLA_DEF_DEPLOYMENT FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES FLW_PL_DEPLOYMENT (ID_);

INSERT INTO FLW_PL_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('10', 'flowable', 'com/flowable/platform/db/liquibase/flowable-platform-db-changelog.xml', SYSTIMESTAMP, 10, '8:6b5c2c550379a95167598086514519a6', 'createTable tableName=FLW_SLA_DEFINITION; createIndex indexName=IDX_FLW_SLA_DEF_UNIQ, tableName=FLW_SLA_DEFINITION; createIndex indexName=IDX_SLA_DEF_DEPLOYMENT, tableName=FLW_SLA_DEFINITION; addForeignKeyConstraint baseTableName=FLW_SLA_DEFINITIO...', '', 'EXECUTED', NULL, NULL, '4.20.0', '2902976283');

CREATE TABLE FLW_TEN_VARIABLE (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, TYPE_ VARCHAR2(255), NAME_ VARCHAR2(255) NOT NULL, TENANT_ID_ VARCHAR2(255), BYTEARRAY_ID_ VARCHAR2(64), DOUBLE_ FLOAT(24), LONG_ NUMBER(38, 0), TEXT_ VARCHAR2(4000), VARIABLE_PROTECTED_ NUMBER(1), CREATED_ TIMESTAMP(6), CREATED_BY_ VARCHAR2(255), LAST_MODIFIED_ TIMESTAMP(6), LAST_MODIFIED_BY_ VARCHAR2(255), CONSTRAINT PK_FLW_TEN_VARIABLE PRIMARY KEY (ID_));

CREATE INDEX FLW_IDX_TEN_VAR_NAME_TENANT ON FLW_TEN_VARIABLE(NAME_, TENANT_ID_);

INSERT INTO FLW_PL_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('11', 'flowable', 'com/flowable/platform/db/liquibase/flowable-platform-db-changelog.xml', SYSTIMESTAMP, 11, '8:2b3ad9b21a4be980bef553011033c85b', 'createTable tableName=FLW_TEN_VARIABLE; createIndex indexName=FLW_IDX_TEN_VAR_NAME_TENANT, tableName=FLW_TEN_VARIABLE', '', 'EXECUTED', NULL, NULL, '4.20.0', '2902976283');

CREATE TABLE FLW_SLA_AUDIT (ID_ VARCHAR2(255) NOT NULL, SCOPE_ID_ VARCHAR2(255) NOT NULL, SUB_SCOPE_ID_ VARCHAR2(255), SCOPE_TYPE_ VARCHAR2(64) NOT NULL, ROOT_SCOPE_ID_ VARCHAR2(255) NOT NULL, ROOT_SCOPE_TYPE_ VARCHAR2(64) NOT NULL, SCOPE_DEFINITION_KEY_ VARCHAR2(255), SUB_SCOPE_DEFINITION_KEY_ VARCHAR2(255), ROOT_SCOPE_DEFINITION_KEY_ VARCHAR2(255), APP_KEY_ VARCHAR2(255), SLA_DEFINITION_KEY_ VARCHAR2(255) NOT NULL, TENANT_ID_ VARCHAR2(255), CREATE_TIME_ TIMESTAMP(6) NOT NULL, IN_PROGRESS_START_TIME_ TIMESTAMP(6), IN_PROGRESS_STARTED_BY_ VARCHAR2(255), CLAIM_TIME_ TIMESTAMP(6), CLAIMED_BY_ VARCHAR2(255), COMPLETION_TIME_ TIMESTAMP(6), COMPLETED_BY_ VARCHAR2(255), IN_PROGRESS_START_DUE_TIME_ TIMESTAMP(6), COMPLETION_DUE_TIME_ TIMESTAMP(6), IN_PROGRESS_START_DUE_DUR_ INTEGER, COMPLETION_DUE_DURATION_ INTEGER, IN_PROGRESS_START_DURATION_ INTEGER, COMPLETION_DURATION_ INTEGER, IN_PROGRESS_START_RELATIVE_ INTEGER, COMPLETION_RELATIVE_ INTEGER, IN_PROGRESS_START_SLA_BREACH_ INTEGER, COMPLETION_SLA_BREACHED_ INTEGER, PAYLOAD_ CLOB, CONSTRAINT PK_FLW_SLA_AUDIT PRIMARY KEY (ID_));

CREATE INDEX FLW_IDX_SLA_SCOPE_ID_TYPE ON FLW_SLA_AUDIT(SCOPE_ID_, SCOPE_TYPE_);

CREATE INDEX FLW_IDX_SLA_SUB_SCOPE_ID_TYPE ON FLW_SLA_AUDIT(SUB_SCOPE_ID_, SCOPE_TYPE_);

INSERT INTO FLW_PL_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('12', 'flowable', 'com/flowable/platform/db/liquibase/flowable-platform-db-changelog.xml', SYSTIMESTAMP, 12, '8:015c3ddfa22fd2ccf472c80e1963216c', 'createTable tableName=FLW_SLA_AUDIT; createIndex indexName=FLW_IDX_SLA_SCOPE_ID_TYPE, tableName=FLW_SLA_AUDIT; createIndex indexName=FLW_IDX_SLA_SUB_SCOPE_ID_TYPE, tableName=FLW_SLA_AUDIT', '', 'EXECUTED', NULL, NULL, '4.20.0', '2902976283');

CREATE TABLE FLW_DASHBOARD (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), CREATOR_ID_ VARCHAR2(255), CREATION_TIME_ TIMESTAMP(6) NOT NULL, UPDATER_ID_ VARCHAR2(255), UPDATE_TIME_ TIMESTAMP(6), CONFIGURATION_ CLOB, TENANT_ID_ VARCHAR2(64) DEFAULT '', CONSTRAINT PK_FLW_DASHBOARD PRIMARY KEY (ID_));

CREATE TABLE FLW_DASHBOARD_COMP_DEFINITION (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, KEY_ VARCHAR2(128), VERSION_ INTEGER, DEPLOYMENT_ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(128), RESOURCE_NAME_ VARCHAR2(4000), TENANT_ID_ VARCHAR2(64) DEFAULT '', CONSTRAINT PK_FLW_DASHB_COMP_DEFINITION PRIMARY KEY (ID_));

CREATE UNIQUE INDEX IDX_DASHB_COMP_DEF_UNIQ ON FLW_DASHBOARD_COMP_DEFINITION(KEY_, VERSION_, TENANT_ID_);

CREATE INDEX IDX_DASHB_COMP_DEF_DEPLOYMENT ON FLW_DASHBOARD_COMP_DEFINITION(DEPLOYMENT_ID_);

ALTER TABLE FLW_DASHBOARD_COMP_DEFINITION ADD CONSTRAINT FK_DASHB_COMP_DEF_DEPLOYMENT FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES FLW_PL_DEPLOYMENT (ID_);

INSERT INTO FLW_PL_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('13', 'flowable', 'com/flowable/platform/db/liquibase/flowable-platform-db-changelog.xml', SYSTIMESTAMP, 13, '8:2ee9eb736f8bb0a7d5a2fa0b15dd7e58', 'createTable tableName=FLW_DASHBOARD; createTable tableName=FLW_DASHBOARD_COMP_DEFINITION; createIndex indexName=IDX_DASHB_COMP_DEF_UNIQ, tableName=FLW_DASHBOARD_COMP_DEFINITION; createIndex indexName=IDX_DASHB_COMP_DEF_DEPLOYMENT, tableName=FLW_DA...', '', 'EXECUTED', NULL, NULL, '4.20.0', '2902976283');

UPDATE FLW_PL_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;
